import { ElMessage } from 'element-plus'
import store from '../store/index'

export const handleTokenExpire = (error) => {
  ElMessage({
    type: 'error',
    duration: 1500,
    message: error,
    grouping: true
  })
  setTimeout(() => {
    store.dispatch('app/logout')
  }, 1500)
}
